<?php 
session_cache_expire(999999999);
if(!isset($_SESSION)) 
{ 
	session_start(); 
}
$lang = $_SESSION['lang'];
if (empty($lang) || $lang == "EN") {
	include "../value/value_en.php";
} else if($lang == "VN") {
	include "../value/value_vn.php";
}
else {
	include "../value/value_kr.php";
}
include '../operations/connection.php';	
$result=mysql_query("SELECT t.*,(SELECT COUNT(*) FROM assets a WHERE a.type=t.id ) as count FROM type_assets t ORDER BY t.name;;");

?>

<table cellpadding="0" cellspacing="1" border="0" class="ftable1" style="width: 100%;margin:auto;overflow:auto; max-height: 500px">
			<tr align='center'>
				<th style="width:30px;"></th>
				<th style="width:190px;"><?=$l_typeassets?></th>
			</tr>
			
		<?php 
		$k=1;
		while ($r=mysql_fetch_array($result)) {
			?>
							<tr>
								<td><?php if($r['count']==0){?><input type="checkbox" id="<?php echo 'checkdeltype'.$k?>" value="<?php echo $r['id'];?>"><?php }else{?><input type="checkbox" id="<?php echo 'checkdeltype'.$k?>" style="display: none"><?php }?></td>
								<td class="tdfirst" style="text-align: left;"><?php echo $r['name'];?></td>
							</tr>
							
							<?php 
							$k++;
		}
		?>
			
		</table> 
<input type="hidden" id="countdeltype" value="<?=$k?>">

<?php mysql_close($connection);?>